const { defineConfig } = require('@vue/cli-service')

const Mock = require('mockjs')
const data = Mock.mock({
  "list|15": [
    {
      tit: "@ctitle",
      img: "@image(150x150,@color)"
    }
  ]
}).list


module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    onBeforeSetupMiddleware({ app }) {
      app.get("/api/list", (req, res) => {
        res.send(data)
      })
    }
  }
})